package com.team.app.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.team.app.dao.CityDao;
import com.team.app.model.City;


@Service
public class CityServiceImpl implements CityService{
	@Autowired
    private CityDao cityDao;     

	@Override
	@Transactional
	public Long create(City obj) {
		// TODO Auto-generated method stub
		return cityDao.create(obj);
	}

	@Override
	@Transactional
	public void edit(City obj) {
		// TODO Auto-generated method stub
		cityDao.edit(obj);
	}

	@Override
	@Transactional
	public void remove(City obj) {
		// TODO Auto-generated method stub
		cityDao.remove(obj);
	}

	@Override
	@Transactional
	public City find(Object id) {
		// TODO Auto-generated method stub
		return cityDao.find(id);
	}

	@Override
	@Transactional
	public List<City> findAll() {
		// TODO Auto-generated method stub
		return cityDao.findAll();
	}

	@Override
	@Transactional
	public List<City> findRange(int[] range) {
		// TODO Auto-generated method stub
		return cityDao.findRange(range);
	}

	@Override
	@Transactional
	public Long count() {
		// TODO Auto-generated method stub
		return cityDao.count();
	} 
}
